GtkWidget *baseline;
GtkWidget *clip_area_row;
GtkWidget *clip_area;
+ GtkWidget *frame_clock_row;
+ GtkWidget *frame_clock;
+ GtkWidget *frame_clock_button;
GtkWidget *tick_callback_row;
GtkWidget *tick_callback;
GtkWidget *framerate_row;
show_object (sl, G_OBJECT (widget), "properties");
}
+static void
+show_frame_clock (GtkWidget *button, GtkInspectorMiscInfo *sl)
+{
+ GObject *clock;
+
+ clock = (GObject *)gtk_widget_get_frame_clock (GTK_WIDGET (sl->priv->object));
+ if (clock)
+ show_object (sl, G_OBJECT (clock), "properties");
+}
+
+static void
+update_frame_clock (GtkInspectorMiscInfo *sl)
+{
+ GObject *clock;
+
+ clock = (GObject *)gtk_widget_get_frame_clock (GTK_WIDGET (sl->priv->object));
+ if (clock)
+ {
+ gchar *tmp;
+ tmp = g_strdup_printf ("%p", clock);
+ gtk_label_set_label (GTK_LABEL (sl->priv->frame_clock), tmp);
+ g_free (tmp);
+ gtk_widget_set_sensitive (sl->priv->frame_clock_button, TRUE);
+ }
+ else
+ {
+ gtk_label_set_label (GTK_LABEL (sl->priv->frame_clock), "NULL");
+ gtk_widget_set_sensitive (sl->priv->frame_clock_button, FALSE);
+ }
+}
+
static gboolean
update_info (gpointer data)
{
gtk_widget_set_visible (sl->priv->realized, gtk_widget_get_realized (GTK_WIDGET (sl->priv->object)));
gtk_widget_set_visible (sl->priv->is_toplevel, gtk_widget_is_toplevel (GTK_WIDGET (sl->priv->object)));
gtk_widget_set_visible (sl->priv->child_visible, gtk_widget_get_child_visible (GTK_WIDGET (sl->priv->object)));
+
+ update_frame_clock (sl);
}
if (GTK_IS_BUILDABLE (sl->priv->object))
gtk_widget_show (sl->priv->realized_row);
gtk_widget_show (sl->priv->is_toplevel_row);
gtk_widget_show (sl->priv->is_toplevel_row);
+ gtk_widget_show (sl->priv->frame_clock_row);
g_signal_connect_object (object, "state-flags-changed", G_CALLBACK (state_flags_changed), sl, 0);
state_flags_changed (GTK_WIDGET (sl->priv->object), 0, sl);
gtk_widget_hide (sl->priv->realized_row);
gtk_widget_hide (sl->priv->is_toplevel_row);
gtk_widget_hide (sl->priv->child_visible_row);
+ gtk_widget_hide (sl->priv->frame_clock_row);
}
if (GTK_IS_BUILDABLE (object))
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, baseline);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, clip_area_row);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, clip_area);
+ gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, frame_clock_row);
+ gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, frame_clock);
+ gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, frame_clock_button);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, tick_callback_row);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, tick_callback);
gtk_widget_class_bind_template_child_private (widget_class, GtkInspectorMiscInfo, framecount_row);
gtk_widget_class_bind_template_callback (widget_class, show_default_widget);
gtk_widget_class_bind_template_callback (widget_class, show_focus_widget);
+ gtk_widget_class_bind_template_callback (widget_class, show_frame_clock);
}
// vim: set et sw=2 ts=2:
</child>
</object>
</child>
+
<child>
<object class="GtkListBoxRow" id="focus_widget_row">
<property name="visible">True</property>
</object>
</child>
+ <child>
+ <object class="GtkListBoxRow" id="frame_clock_row">
+ <property name="visible">True</property>
+ <property name="activatable">False</property>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="orientation">horizontal</property>
+ <property name="margin">10</property>
+ <property name="spacing">40</property>
+ <child>
+ <object class="GtkLabel" id="frame_clock_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Frame Clock</property>
+ <property name="halign">start</property>
+ <property name="valign">baseline</property>
+ <property name="xalign">0.0</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="frame_clock">
+ <property name="visible">True</property>
+ <property name="selectable">True</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="ellipsize">end</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="frame_clock_button">
+ <property name="visible">True</property>
+ <property name="halign">end</property>
+ <property name="valign">baseline</property>
+ <property name="label" translatable="yes">Properties</property>
+ <signal name="clicked" handler="show_frame_clock"/>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+
<child>
<object class="GtkListBoxRow" id="tick_callback_row">
<property name="visible">true</property>
<widget name="buildable_id_label"/>
<widget name="default_widget_label"/>
<widget name="focus_widget_label"/>
+ <widget name="frame_clock_label"/>
</widgets>
</object>
</interface>